#pragma once
#include <cliext/stack> 
#include<stack> 
#define MAXLENGTH 8
#define MAXWIDTH 8
using namespace std;
//typedef cliext::stack<wchar_t> ActionStack;
enum Chessman{empty,white,black};
//ref
typedef struct tagCurveTX
{
	int x;
	int y;
	Chessman chessman;
			   //CString str;
}ACTION,*PACTION;

class Chessboard
{
private:
	int _Length;
	int _Width;
	int _Chessboard[MAXLENGTH][MAXWIDTH];
	Chessman _LastChessman;
	stack<ACTION> _ActionStack;
public:
	Chessboard(void);
	~Chessboard(void);
	bool PlayChess(int x,int y,Chessman chessman);
	void Display();
	void Play();
	Chessman GetWinner(int x,int y,Chessman chessman);
	bool Undo(int x,int y);
	bool Undo();
};
